﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SQLite;
using System.Data;
using He.Common;

namespace He.DAL
{
    public partial class attr_item
    {
        public readonly string TblName = SysKeys.TABLE_PREFIX + "attr_item";

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool DeleteByFieldId(int fieldId)
        {

            StringBuilder strSql = new StringBuilder();
            strSql.Append("delete from " + TblName);
            strSql.Append(" where field_id=@field_id");
            SQLiteParameter[] parameters = {
					new SQLiteParameter("@field_id", DbType.Int32,4)
			};
            parameters[0].Value = fieldId;

            int rows = DbHelperSQLite.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
